<div class=""><!--阅卷准备_07阅卷教师信息维护_编辑-->
    <form method='post' action='<?php echo $this->createUrl('/problem/default/problemaccount') ?>'>
        <table class="fontc_666 height32">
            <tbody>
                <tr>
                    <td width="105" align="right" class="pt10 pr3">已选择教师：
                        <?php if ($user_id): foreach ($user_id as $key => $one): ?>  
                                <input type="hidden" name="user_id[]" value="<?php echo $one; ?>"></td>
                            <?php
                            endforeach;
                            endif;
                    ?>
                    <td width="" class="pt10"><?php echo $username; ?></td>
                </tr>
                <tr>
                    <td valign="top" align="right" class="pt20 pr5 pb20">账号生成规则：</td>
                    <td class="pt20 pb20">
                        <input type="text" name="teacher_num" value="(*)" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666"><font style="color:red">(*)为通配符</font>
                    </td>
                </tr>
                <tr height="55">
                    <td valign="top" align="right" class="pr5"><input type="radio" name="gz" value="1" checked></td>
                    <td valign="top">
                        从<input type="text" name="start" id="start" value="1" style="width:20px;" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666">到<input type="text" name="end" id="end" value="70" style="width:20px;" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666">通配符长度：<input type="text" name="length" id="length" value="2" style="width:20px;" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666"><font style="color:red">（长度1~3）</font>
                    	<div class="formValidator_tip">
                            <p id="stringTip" ></p>
                        </div>
                    </td>
                </tr>
                <tr height="55">
                    <td valign="top" align="right" class="pr5"><input type="radio" name="gz" value="2"></td>
                    <td valign="top">
                        从<input type="text" name="astart" id="astart" value="a" style="width:20px;" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666">到<input type="text" name="aend" id="aend" value="z" style="width:20px;" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666"><font style="color:red">（区分大小写）</font>
                    	<div class="formValidator_tip">
                            <p id="letterTip" ></p>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="pr3">密码：</td>
                    <td><input type="text" value="12345678" name="teacher_pswd" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" /></td>
                </tr>
                <tr>
                    <td align="right" class="pt20 pr3 pb20"></td>
                    <td class="pt20 pb20">                        
                        <input type="submit" value="确认" name='allsubmit' class="b_a_n border_3 back_bgfb w80 height32 fontc_FFF fonts_12 cursor" />
                        <input type="button" value="取消" onclick="api.close()" class="b_a_n border_3 back_bgb w80 height32 fontc_FFF fonts_12 mr10 cursor" />
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</div>
<script>
$(function() {
	$.formValidator.initConfig({formID: "searchForm", theme: "126", submitOnce: false,
	onError: function(msg, obj, errorlist) {
		$("#errorlist").empty();
		$.map(errorlist, function(msg) {
			$("#errorlist").append("<li>" + msg + "</li>")
		});
		alert(msg);
	},
	ajaxPrompt: '有数据正在异步验证，请稍等...'
	});


	$("#start").formValidator({
		tipID:"stringTip",
		onShowText: "",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max: 3,
		onError: "输入非法整数不超过三位数"
	}).regexValidator({
		regExp: "intege1",
		dataType: "enum",
		onError: "输入非法整数不超过三位数"
	}).functionValidator({
		fun:stringFn
	});
	$("#end").formValidator({
		tipID:"stringTip",
		onShowText: "",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max: 3,
		onError: "输入非法整数不超过三位数"
	}).regexValidator({
		regExp: "intege1",
		dataType: "enum",
		onError: "输入非法整数不超过三位数"
	}).functionValidator({
		fun:stringFn
	});
	$("#length").formValidator({
		tipID:"stringTip",
		onShowText: "",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max: 1,
		onError: "输入非法整数不超过一位数"
	}).regexValidator({
		regExp: "intege1",
		dataType: "enum",
		onError: "输入非法整数不超过一位数"
	}).functionValidator({
		fun:stringFn
	});;

	$("#astart").formValidator({
		tipID:"letterTip",
		onShowText: "",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max: 1,
		onError: "请输入一位字母"
	}).regexValidator({
		regExp: "letter",
		dataType: "enum",
		onError: "请输入一位字母"
	});
	$("#aend").formValidator({
		tipID:"letterTip",
		onShowText: "",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max: 1,
		onError: "请输入一位字母"
	}).regexValidator({
		regExp: "letter",
		dataType: "enum",
		onError: "请输入一位字母"
	});


	function stringFn( val ){
		var msg=""
		startVal = $("#start").val(),
		endVal = $("#end").val(),
		lengthVal = $("#length").val();
		if( startVal > endVal ){
			msg = "请输入正确规则";
		}else{
			msg = true;
		}

		return msg;

	}


})
function change() {
	var sujectname = $('#subject_id').find("option:selected").text();
	$.post('/question_collect/default/sujectquestions', {sujectname: sujectname}, function(result) {
		var obj = $.parseJSON(result), newHtml = "";
		newHtml = '<option value="0">请选择</option>';
		$.each(obj, function(i, item) {
			newHtml += "<option value='" + i + "'>" + item + "</option>"
		})
		$("#num_type").html(newHtml);
	});
}
</script>
<?php exit; ?>